﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Windows.Forms;

namespace DX_Recognize
{
    public partial class BoardSelectForm : Form
    {
        public BoardSelectForm()
        {
            InitializeComponent();
        }
        public event Action<string> PassBoardAction;

        private void SelectBoardSureBtn_Click(object sender, EventArgs e)
        {
            // 获取要+的板
            string BoardCode = (string)SelectBoardComboBox.SelectedValue;
            PassBoardAction?.Invoke(BoardCode);
            this.Hide();
        }

        private void BoardSelectForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            this.Hide();//窗口隐藏
            e.Cancel = true;//取消关闭
        }

        private void CancelBtn_Click(object sender, EventArgs e)
        {
            this.Hide();
        }
    }
}
